import Vue from 'vue'
import VueRouter from 'vue-router'

// import App from '../App'

import NotFound from '../views/404'

import FindAll from '../views/FindAll'
import Add from '../views/AddStudent'
import Page3 from '../views/Page3'
import Page4 from '../views/Page4'

import Update1 from '../views/Update1'


import Index from '../views/index'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: '神奇宝贝图鉴',
    component: Index,
    show: true,
    redirect: '/findAll',
    children: [
        {
            path: '/findAll',
            name: '查询所有',
            component: FindAll
        },
        {
            path: '/add',
            name: '添加信息',
            component: Add
        }
    ]
  },
  {
      path: '/update',
      show: false,
      component: Update1
  },
  /*{
    path: '/navigation',
    name: '导航二',
    component:Index,
    children: [
        {
            path: '/page3',
            name: '页面三',
            component: Page3
        },
        {
            path: '/page4',
            name: '页面四',
            component: Page4
        }
    ]
  },*/
  {
     path: '*',
     show: false,
     component: NotFound
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
